import request from '@/router/axios';

export const getList = (current, size, params) => {
    return request({
        url: '/api/blade-sale/forecastplan/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const remove = (ids) => {
    return request({
        url: '/api/blade-sale/forecastplan/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}

export const add = (row) => {
    return request({
        url: '/api/blade-sale/forecastplan/save',
        method: 'post',
        data: row
    })
}

export const confirm = (ids) => {
    return request({
        url: '/api/blade-sale/forecastplan/submit',
        method: 'post',
        params: {
            ids,
        }
    })
}

export const update = (row) => {
    return request({
        url: '/api/blade-sale/forecastplan/update',
        method: 'post',
        data: row
    })
}
//查看
export const detail = (id) => {
    return request({
        url: '/api/blade-sale/forecastplan/detail',
        method: 'get',
        params: {
            id
        }
    })
}
//提交
export const submit = (id) => {
    return request({
        url: '/api/blade-sale/forecastplan/start-process',
        method: 'post',
        params: {
            id,
        }
    })
}
export const getprojectList = (current, size,customerId, planYear) => {
    return request({
        url: '/api/blade-sale/forecastplan/list',
        method: 'get',
        params:{
            current,
            size,
            customerId,
            planYear
        }
    })
}

